home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1998 August / PC Plus SuperCD 50b Issue 142 (CD142b) (August 1998).iso / handson / Java / VCAdventure / Thing.java < prev    next >
Encoding:
Java Source  |  1998-01-23  |  715 b   |  32 lines

  1. import java.lang.*;
  2. import java.io.*;
  3.  
  4. public class Thing extends java.lang.Object implements java.io.Serializable
  5. {
  6.     // Basic Thing type that defines all objects in the Adventure
  7.     
  8.     private String name;
  9.     private String description;
  10.     
  11.     Thing( String aName, String aDescription ) {
  12.         // constructor
  13.         this.name = aName;
  14.         this.description = aDescription;
  15.     }
  16.  
  17.     String getname() {
  18.         return name;
  19.     }
  20.  
  21.     void setname(String aName) {
  22.         this.name = aName;
  23.     }
  24.  
  25.     String getdescription() {
  26.         return description;
  27.     }
  28.  
  29.     void setdescription(String aDescription) {
  30.         this.description = aDescription;
  31.     }         
  32. }